﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace lcs.Web.Outstorage
{
    public partial class PrintReturnGoods : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!string.IsNullOrEmpty(Request["returnNo"]))
                {
                    Bind(Request["returnNo"]);
                }
            
            }
        }

        private void Bind(string returnNo)
        {
            lcs.BLL.returnGoods rm = new BLL.returnGoods();

            DataSet ds = rm.GetList(" returnNo='" + returnNo + "'");

            if (ds.Tables[0].Rows.Count > 0)
            {
                this.lbl_returnNo.Text = returnNo;
                this.lbl_proid.Text = ds.Tables[0].Rows[0]["proid"].ToString();
                this.lbl_project_name.Text = ds.Tables[0].Rows[0]["projectname"].ToString();
                this.lbl_returnName.Text = ds.Tables[0].Rows[0]["return_user_name"].ToString();

                this.GridView1.DataSource = ds;
                this.GridView1.DataBind();
            }
        }
    }
}